home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / serial / mdm-2.000 / mdm-2 / strupr.c < prev    next >
C/C++ Source or Header  |  1993-10-10  |  2KB  |  82 lines

  1. /*************************************************************************
  2. Convert a String to Uppercase
  3. --------------------------------------------------------------------------
  4.  
  5.     Copyright (C) 1992  Anthony Rumble
  6.  
  7.     This program is free software; you can redistribute it and/or modify
  8.     it under the terms of the GNU General Public License as published by
  9.     the Free Software Foundation; either version 1, or
  10.     any later version.
  11.  
  12.     This program is distributed in the hope that it will be useful,
  13.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15.     GNU General Public License for more details. <copying>
  16.  
  17.     You should have received a copy of the GNU General Public License
  18.     along with this program; if not, write to the Free Software
  19.     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20.  
  21. --------------------------------------------------------------------------
  22. RCS Info
  23.  
  24. $Header: /home/smilie/bbs/modem/RCS/strupr.c,v 1.3 1992/10/10 06:04:48 smilie Exp $
  25.  
  26. $Log: strupr.c,v $
  27.  * Revision 1.3  1992/10/10  06:04:48  smilie
  28.  * fixed a date
  29.  *
  30.  * Revision 1.2  1992/10/09  13:40:59  smilie
  31.  * fixed some warnings
  32.  *
  33.  * Revision 1.1  1992/10/09  10:12:58  smilie
  34.  * Initial revision
  35.  *
  36.  
  37. *************************************************************************/
  38.  
  39. /* Feature test switches */
  40. #define _POSIX_SOURCE 1
  41. #define _STRUPR_C
  42.  
  43. /* System Headers */
  44. #include <stdio.h>
  45. #include <ctype.h>
  46.  
  47. /* Local Headers */
  48.  
  49. /* Macros */
  50.  
  51. /* File scope variables */
  52.  
  53. static char strupr_rcsid[] = "$Id: strupr.c,v 1.3 1992/10/10 06:04:48 smilie Exp $";
  54. #define RCSID strupr_rcsid
  55.  
  56. /* External variables */
  57.  
  58. /* External Functions */
  59.  
  60. /* Structures and unions */
  61.  
  62. /* Functions */
  63.  
  64. /***************************************************************************
  65.                   STRUPR
  66. ---------------------------------------------------------------------------
  67. Makes a String Uppercase.
  68. ***************************************************************************/
  69. char *strupr(char *st)
  70. {
  71. char *t = st;
  72. /**/
  73. while (t[0])
  74.     {
  75.     t[0] = toupper(t[0]);
  76.     t++;
  77.     }
  78. return st;
  79. }
  80.  
  81.  
  82.